package com.px.baolaiapi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.px.mbg.model.Users;
import com.px.baolaiapi.page.UsersPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 用户信息 Mapper 接口
 * </p>
 *
 * @author 品讯科技
 * @since 2022-05-23
 */
@Repository()
public interface UsersApiMapper extends BaseMapper<Users> {

    /**
     * 根据部门编码查询人员信息
     * @param deptCode
     * @return
     */
    List<Users> queryUsersByDeptCode(@Param("deptCode") String deptCode,@Param("organizationId") Long organizationId);


    /**
     * 分页查询用户信息根据组织ID
     * @param usersPage
     * @return
     */
    IPage<Users> queryUsersByOid(IPage page, @Param("usersPage") UsersPage usersPage);


    /**
     * 查询该组织下所有用户
     *
     * @param organizationId 组织id
     * @return {@link List<Users>}
     */
    List<Users> queryUserAllByOid(@Param("organizationId")Long organizationId);
}
